:host {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 14px;
  color: #333;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: block;
  width: 100%;
}

.toolbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  background-color: #1976d2;
  color: white;
  font-weight: 600;
  padding: 0 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.toolbar img {
  margin: 0 16px;
}

.spacer {
  flex: 1;
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

nav a.active {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: bold;
}

.container {
  display: flex;
  margin: 82px auto 32px;
  padding: 0 16px;
  max-width: 1200px;
  width: 100%;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.blockly-container {
  width: 100%;
  margin-top: 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.code-container {
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  background-color: #f5f5f5;
  border-radius: 4px;
  box-sizing: border-box;
}

.code-container pre {
  background-color: #f0f0f0;
  padding: 10px;
  border-radius: 4px;
  overflow: auto;
  max-height: 300px;
}

.code-container button {
  margin-top: 10px;
  margin-right: 10px;
  padding: 8px 16px;
  background-color: #1976d2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.code-container button:hover {
  background-color: #125699;
}

.blockly-wrapper {
  width: 100%;
  margin-top: 0px;
}
.container {
  h1 {
    text-align: center;
    margin-bottom: 20px;
  }
}

/* Variable selection modal styles */
.variable-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.show-modal {
  display: block;
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.close-button {
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

.search-container {
  margin-bottom: 15px;
}

.search-container input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.variable-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 4px;
}

.variable-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.variable-item:hover {
  background-color: #f5f5f5;
}

.variable-item.selected {
  background-color: #e0f7fa;
}

.modal-footer {
  margin-top: 15px;
  text-align: right;
}

.btn {
  padding: 8px 16px;
  margin-left: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background-color: #e0e0e0;
}

.save-btn {
  background-color: #1976d2;
  color: white;
}

.save-btn:hover {
  background-color: #1565c0;
}
